package cn.edu.hust.sse.software7.class3.entities;

import java.io.Serializable;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

/**
 * This is the administrator of the eBusiness, the Default administrator is
 * admin/pass you can change the enable the admin or unenable it ,but only has
 * another administrator you can unenable the admin. you can also add another
 * adminstrator or delete it ,but cannot delete admin.
 * 
 * @author mason
 * 
 */
@PersistenceCapable(identityType=IdentityType.APPLICATION)
public class EBAdmin implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@PrimaryKey
	@Persistent(valueStrategy=IdGeneratorStrategy.IDENTITY)
	private Long adId;
	@Persistent
	private String adName;
	@Persistent
	private String passwd;
	@Persistent
	private String description;
	@Persistent
	private boolean enable;

	public EBAdmin(String adName, String passwd, String description) {
		super();
		this.adName = adName;
		this.passwd = passwd;
		this.description = description;
	}

	
	public EBAdmin(String adName, String passwd) {
		super();
		this.adName = adName;
		this.passwd = passwd;
	}


	public Long getAdId() {
		return adId;
	}


	public String getPasswd() {
		return passwd;
	}

	public void setPasswd(String passwd) {
		this.passwd = passwd;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getAdName() {
		return adName;
	}

	public boolean isEnable() {
		return enable;
	}


	public void setEnable(boolean enable) {
		this.enable = enable;
	}
}
